Repository navigation
Conversation
…n-loopback hosts A configured URL that receives a first-party credential should be https, or plain http to a loopback host. agent-device 0.21.x warns on stderr, once per origin, for any other URL; 0.22 will refuse with reason insecure_credential_transport. Nothing breaks in this release. Checked destinations: the remote daemon URL, the cloud URL (including the stored issuer on refresh), the Metro bridge URL, and the @agent-device/proxy upstream URL with its default transport. A direct-upload ticket that fails the rule is dropped unsent and the upload takes the legacy route. AGENT_DEVICE_ALLOW_INSECURE_TRANSPORT=1 in the sending process's environment allows plain http. @agent-device/proxy reads it from the new `env` option. The daemon resolution and Revyl loopback classifiers now share one owner. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
… digests Two new contracts exports, and acks for the upload preflight declarations that now judge a ticket URL locally. No request or response shape changes. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Size Report
Startup median (7 runs, lower is better):
Affected plugins
|
`createDaemonProxy` takes no environment option. The `agent-device proxy` upstream is the local daemon on loopback, and an embedder with another plain http upstream supplies `upstreamFetch` or uses https. The warning names those fixes instead of an environment variable the proxy does not read. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
Review completed against the latest diff
Reply with feedback, questions, or to request a fix.
View guided diff | Turn on auto-fix | Re-trigger cubic
Login judges the URL it reads, and a refresh judges the stored issuer, before either sends. This keeps auth-session.ts within the file line cap. The ticket tests now assert that no request opens to the ticket host, and the Metro test asserts the bearer it is judging. The docs limit the loopback claim to the daemon and proxy listeners, and the CLI help says which process reads the override. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Re-exporting it from an existing subpath would load the rule eagerly in every importer: 43 entry closures grow through diagnostics, 9 through transport. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This comment has been minimized.
This comment has been minimized.
|
Three problems need a fix before merge at 5537b6e: the new warning can make a command fail, it can print twice, and two doc statements no longer match the client. A second independent pass found that packages/host-kit/src/credential-admission.ts:21 can turn the 0.21.x warning into a fatal error. If a supervisor closes the stderr reader, a non-loopback HTTP daemon command with a daemon token can exit on an unhandled EPIPE. Cloud login, refresh and profile requests, Metro prepare, and a default proxy sending its upstream token use the same helper. In a standalone check on Node v26.11.1 (Darwin) with the reader closed, the run completed without the write and exited 1 with EPIPE with it. The warning must never change a command's outcome for any caller of the helper. Please make the shared write best effort and handle both synchronous errors and stream errors locally, as src/cli/auth-session.ts:961-980 does. To validate, run a command that warns with the stderr reader closed and show the same result as without the warning. A second independent pass found that the packages/host-kit/src/credential-admission.ts:5 A second independent pass found that website/docs/docs/remote-proxy.md:26 is now wrong about uploads. With an HTTPS tunnel, no Not blocking: these can be taken or left: call None of the earlier inline threads still applies, so they can be resolved: #5179 (comment) (the single check at the Metro bridge URL, using the sender's trusted env, is correct as is), #5179 (comment) (fixed: the test now asserts that only loopback requests are sent), #5179 (comment) (fixed: the test now asserts the bridge authorization header), #5179 (comment) (fixed: the docs now separate loopback listeners from traffic between machines), and #5179 (comment) (fixed: the help text now names the process that needs the override). All 26 checks pass at this commit. Not verified here: no tests were run locally, and the ability of the ticket, daemon-client, cloud, Metro and proxy tests to catch a regression was judged by reading the code path without the guard, not by mutation. The override order inside |
…utcome A closed stderr reader turned the warning into an unhandled EPIPE: the command exited 1 with no output. The write is now best effort. The docs say the warning appears once per origin per loaded package, and that `--public-origin` gives upload tickets an HTTPS origin while the client otherwise uploads through the daemon URL. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
|
Addressed the review of 5537b6e in 0778c18. Closed stderr. Reproduced with the real CLI (
A write callback alone does not help: in a standalone script it still exited 1, because the stream also emits Duplicate warning. I changed the wording to "once per origin per loaded package" instead of sharing state through a process-wide symbol. It is the smallest change, it matches the code, and a second line on stderr is harmless.
Non-blocking. The configuration row now says "(not The earlier inline threads are resolved. |
* origin/main: fix(cli): judge install-from-source lease admission by its daemon command (#5169) ci: report sizes for affected plugins (#5176) fix(ios): keep the zh-Hans alert vocabulary check honest about OS versions (#5177) Consolidate Apple tap and replacement result construction (#5161) fix(daemon): retry provider lease record retirement (#5174)
Apex Sentinel · ✅ Approve · review of
|
| Command | What it does |
|---|---|
@apex-sentinel-staging note <context> |
Adds context; Sentinel re-checks the cited code |
@apex-sentinel-staging pivot <why> |
Says the finding is wrong; Sentinel re-checks the cited code |
@apex-sentinel-staging like |
Marks the finding as useful |
@apex-sentinel-staging dislike <why> |
Marks it as not useful, so it is not raised again |
On this conversation, comment @apex-sentinel-staging review to run a full review once again.
|
The three problems from the earlier review are fixed at 7c36328, but the fix adds a listener leak on stderr that needs a change before merge. A second independent pass found that packages/host-kit/src/credential-admission.ts:25 likely leaves a one-shot stderr None of the earlier inline threads still applies, so they can be resolved: #5179 (comment) (the single check at the Metro bridge URL is correct as is), #5179 (comment) (fixed: the test asserts that only loopback requests are sent), #5179 (comment) (fixed: the test asserts the bridge authorization header), #5179 (comment) (fixed: the docs separate loopback listeners from traffic between machines), and #5179 (comment) (fixed: the help text names the sending process). All 25 checks pass at this commit. Not verified here: no local tests were run, the real CLI was not run with stderr closed (the guarded and unguarded writes were reproduced only in a standalone Node v26.11.1 script), and the two built packages were not loaded in one process (the per-package behavior was inferred from the build configs). |
A successful write removes its listener, so many origins add none. A failed write keeps it, because EPIPE is emitted after the write callback. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Re: review of 7c36328. Fixed in 1fd11aa: the stderr
Validation:
|
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Summary
First-party credentials belong on
https:, orhttp:to loopback. For other URLs, 0.21.x warns on stderr once per origin per loaded package; 0.22 will refuse (insecure_credential_transport; one function flips). The warning is best effort. ADR: #5178.Covers daemon, cloud (including refresh), Metro bridge, and default-transport proxy URLs. Insecure upload tickets are dropped unsent for the legacy upload. Daemon and Revyl share one loopback classifier.
Breaking: none on
main. In 0.22, non-loopbackhttp://setups need encryption orAGENT_DEVICE_ALLOW_INSECURE_TRANSPORT=1. The proxy package has no override: use https, a loopback upstream, orupstreamFetch.auth-session.tsis at the line cap.host-kitsubpath: reusing an existing one grows 9–43 startup closures.Before / after
Remote daemon at a plain-HTTP, non-loopback URL. Before: token sent silently. After:
Validation
At
0778c18ee6: nine changed test files, 70 passed. Live CLI against a local fake daemon with stderr closed: exit 0 with output (exit 1, no output, before). Lint, typecheck, and gates are left to CI.Security
1, from the sending process's host environment; profiles, tickets and requests cannot set it.🤖 Generated with Claude Code